package com.pingsky.apm.agent.core.trace;

import com.pingsky.apm.network.language.agent.v1.PException;

public class TraceException {
    private String exceptionName;
    private String exceptionMessage;

    public TraceException(String exceptionName, String exceptionMessage) {
        this.exceptionName = exceptionName;
        this.exceptionMessage = exceptionMessage;
    }

    public PException build() {
        return PException.newBuilder()
                .setExceptionName(exceptionName)
                .setExceptionMessage(exceptionMessage)
                .build();
    }
}
